﻿<navigation:Page x:Class="LEEAAttendanceControl.Views.SpecificOvertime"
           xmlns:vc="clr-namespace:LEEAAttendanceControl.Codes"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
           xmlns:my="clr-namespace:LEEAAttendanceControl.Web.Services"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <vc:MinutesToHoursConverter x:Key="MinutesToHoursConverter"/>
        </Grid.Resources>

        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
            <Grid>
                <StackPanel Orientation="Vertical">
                    <Grid Background="#404041" HorizontalAlignment="Stretch">
                        <TextBlock x:Name="OvertimeBlock" Text="Hours" Foreground="White" FontSize="13" FontWeight="Bold"
                           Margin="5,2,2,2"/>
                    </Grid>

                    <sdk:DataGrid x:Name="OvertimeGrid" IsReadOnly="True" AutoGenerateColumns="False" MaxHeight="445"
                                  VerticalScrollBarVisibility="Visible">
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTemplateColumn Header="Day" CanUserSort="True" Width="195">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <sdk:Label Content="{Binding ActualIN, StringFormat='dd/MM/yyyy'}"
                                                   Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"
                                                   Height="25"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Header="Paid Hours" CanUserSort="True" Width="197">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <sdk:Label Content="{Binding ActualHours, Converter={StaticResource MinutesToHoursConverter}}"
                                                   Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"
                                                   Height="25"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Header="Actual Overtime" CanUserSort="True" Width="197">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <sdk:Label Content="{Binding ActualOvertime, Converter={StaticResource MinutesToHoursConverter}}"
                                                   Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"
                                                   Height="25"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Header="Rounded Overtime" CanUserSort="True" Width="197">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <sdk:Label Content="{Binding RoundedOvertime, Converter={StaticResource MinutesToHoursConverter}}"
                                                   Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"
                                                   Height="25"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                </StackPanel>
            </Grid>
        </ScrollViewer>
    </Grid>
</navigation:Page>
